﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FunOfAlgorithms
{
    public class Chapter_02
    {
        int Start = 0;
        int End = 0;
        int Length = 20;


        public void Method1()
        {

            Start = 0;
            End = 0;

            // 写入10
            End = 10;

            //写入100

            if (End < Start)
            {
                Start = End + 1;
                End = (End + 100) % Length;
            }
            else
            {
                Start = End + 1;
                End = (End + 100) % Length;
            }

           
            int[] arry = new int[12];
            for (int i = 0; i < 255; i++)
            {
            }

            List<int> list = new List<int>();
            list.ToArray();

            int[] arr = { 1, 3, 2, 4 };
            int[] arr3 = new int[] { 1, 3, 4, 5, 6 };

            int[] arr1 = new int[4];
            int[] arr2 = new int[4] { 1, 2, 3, 4};

            

            List<int> values = new List<int>();
            int[] arr4 = new int[100];

            for (int i = 0; i < values.Count; i++)
            {
                arr4[values[i] - 1]++;
            }

        }
    }

    public struct ActionProcess
    {
        string ActhionNAme;

        Action act;
    }
}
